Expand description
Buffertk provides tooling for serializing and deserializing data.
Re-exports
Modules
- This module provides an implementation of the variable integer encoding specified in the protobuf encoding documentation.
Structs
- A type that packs a slice of objects by concatenating their packed representations. Does not prepend a length.
- A type that packs a slice of objects by concatenating their packed representations. Prepends a length.
- StackPacker is the type returned by StackPack. It’s a pointer to something packable (usually another StackPacker) and some type that we can directly pack. Both are packable, but it’s usually the case that the former is another StackPacker while the latter is the type being serialized in a call to
pack
. - Unpacker parses a buffer start to finish.
Enums
- All Error conditions within
buffertk
.
Traits
- Packable objects can be serialized into an
&mut [u8]
. - Unpackable objects can be deserialized from an
&[u8]
.
Functions
- Pack a byte slice without a length prefix. The resulting format is equivalent to concatenating the individual packings.
pack_helper
takes a Packable object and an&mut [u8]
and does the work to serialize the packable into a prefix of the buffer. The return value is the portion of the buffer that remains unfilled after this operation.stack_pack
begins a tree of packable data on the stack.